<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>活动记录查询</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="static/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="static/layuiadmin/style/admin.css" media="all">
</head>
<body>
<!--templates/table/hdjlcx-->
<div class="layui-card layadmin-header">
  <div class="layui-breadcrumb" lay-filter="breadcrumb">
  </div>
</div>

<div class="layui-fluid">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-header card-title">活动记录查询</div>
        <div class="layui-card-body">
          <form class="layui-form" lay-filter="component-form-group" id="search_submits" onsubmit="return false">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="layadmin-useradmin-formlist">
              <div class="layui-inline">
                <a class="layui-btn btn-add btn-default" id="export">导出数据</a>
              </div>
            </div>
          </form>
          <table class="layui-hide" id="test-table-cellEdit" lay-filter="test-table-cellEdit"></table>
        </div>
      </div>
    </div>
  </div>
</div>

<script src="static/layui/layui.js"></script>
<script th:inline="none">
  layui.config({
    base: 'static/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'table','form'], function(){
    var $ = layui.$;
    var table = layui.table;
    var form = layui.form;
    var exportData;
    var loading = layer.load();
    var ins1 = table.render({
      elem: '#test-table-cellEdit'
      ,method:'post'
      , url: '/selecthdjlcx'
      ,page:{limit:10,limits:[10,20,30,50,100,1000]}
      , cols: [[
        {field: 'aname', title: '活动名称', width: 200,sort: true}
        , {field: 'axx', title: '活动详情', width: 400,sort:true}
         , {field: 'ssuid', title: '所属学生', width: 220,sort:true}
        , {field: 'add', title: '活动地点', width: 200,sort:true}
        , {field: 'adate', title: '活动时间', width: 160,sort:true}
        , {field: 'alx', title: '活动类型', width: 160,sort:true}
      ]]
      , done: function (res, curr, count) {
        layer.close(loading);
        exportData = res.data;
      }
    })
    $("#export").click(function(){
      table.exportFile(ins1.config.id,exportData, 'xls');
    })
  });

</script>
</body>
</html>